<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #adver{
            position: absolute;
            left:-100px;
            top:280px;
        }
        #big{
            width: 100px;
            height: 200px;
            background-color: #f00;
            position: absolute;
            left:0;
        }
        #small{
            width: 50px;
            height: 100px;
            background-color: pink;
            position: absolute;
            left:100px;
            top:50px;
        }
    </style>
</head>
<body>
    <div id="adver">
        <div id="big"></div>
        <div id="small"></div>
    </div>

    <script>
        let oSmall = document.getElementById('small');
        let oAdver = document.getElementById('adver');
        // oSmall.onmouseover = function(){
        //     oAdver.style.left = '0px';
        // }

        // 取消冒泡
        // oSmall.onmouseout = function(ev){
        //     ev.cancelBubble = true;
        // }

        oAdver.onmouseover = function(){
            oAdver.style.left = '0px';
        }

        oAdver.onmouseout = function(){
            oAdver.style.left = '-100px';
        }
    </script>
</body>
</html>